// Created by Chee Hwa

Ext.define("MajorProjectSenchaTouch.view.MyAccountModule.MyAccountMain", {
	extend: 'Ext.Panel',
	xtype: 'myaccountmain',
    id: 'myaccmain',
	config: {
        cls: 'backgroundRightArrowPanel',
		styleHtmlContent: true,
		// scrollable:true,
		items: [{
            items: [{
			    docked: 'top',
                xtype: 'container',
				id: 'topPanel',
				items:[{
					items: {
						xtype: 'panel',
						layout: {
							type: 'hbox'
						},
						items:[{
							html: ["Welcome&nbsp;"]
						},
						{
							itemId: 'nameOfUser',
							xtype: 'label',
							html: ["<div id='nameOfUser'>Loading...</div>"]
						}]
					}
				},
				{
					xtype: 'panel',
					layout: {
						type: 'hbox'
					},				
					items: [{
						xtype: 'button',
						// id: 'buttonninja1',
						style: 'border:white',
						width: '90%',
						html: '<div align="left">My Loans</div>',
						action: 'goMyAccLoan'
					},
					{
						itemId: 'noForLoan',
						// width: '10%',
						xtype: 'label',
						html: "<div align='right' id='noForLoan'>Loading...</div>"				
					}]
				},
				{
					html: '<hr>'
				},
				{
					xtype: 'panel',
					layout: {
						type: 'hbox'
					},				
					items: [{
						xtype: 'button',
						// id: 'buttonninja2',
						style: 'border:white',
						width: '90%',
						html: '<div align="left">My Reservations</div>',
						action: 'goMyAccReservation'
					},
					{
						itemId: 'noForReservation',
						// width: '10%',
						xtype: 'label',
						html: "<div align='right' id='noForReservation'>Loading...</div>"					
					}]					
				}]			
            }]
        },
		{ 
			xtype: 'spacer',
			height: 20
		},
		{
			xtype: 'button',
			id: 'btnMyAccountLogout',
			text:'Logout',
			action: 'goMyAccLogin'
		}]
    },
	initialize: function () {
		this.fireEvent('showName', this);
		// this.showName();
		// MajorProjectSenchaTouch.controller.Main.activatebomb();
	}
});